<!DOCTYPE html>
<html ng-app>
<head>
    <meta charset="utf-8">
    <title>How to use expression</title>
    <script type="text/javascript" src="../angular.js"></script>
</head>
<body>
    <div>四则运算：</div>
    <div>1 + 2 = {{1+2}}</div>
    <div>99 - 1 = {{99-1}}</div>
    <div>3 * 7 = {{3*7}}</div>
    <div>81 / 9 = {{81/9}}</div>
    <div>"Hello"+"AngularJS" = {{"Hello"+"AngularJS"}}</div>
    <br>
    <div>逻辑运算：</div>
    <div>1 || 0 = {{1||0}}</div>
    <div>true && false = {{true && false}}</div>
    <br>
    <div>表达式与作用域：</div>
    <!-- ng-init指令：
        用于初始化作用域
-->
    <div ng-init="person={'name':'Jacktanger'};arr=['AngularJS','jQuery','Dojo']">
        <div>Hello {{person.name}}~</div>
        <div>{{arr[0]}}</div>
    </div>
</body>
</html>